package hardcode2013;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

public class GoogleUtil {

	public static String getEmail() {
		UserService userService = UserServiceFactory.getUserService();
        User user = userService.getCurrentUser();
		return (user != null ? user.getEmail() : null);
	}
	
	public static String getLoginUrl(String redirectUrl) {
		return UserServiceFactory.getUserService().createLoginURL(redirectUrl);
	}
}
